﻿using System;
using System.Collections.Generic;
using System.Text;

namespace Barbar.Colonization.Core.Localization {
  public class TranslatorKey {
    private string m_Code;
    private int m_Lcid;

    public TranslatorKey(string code, int lcid) {
      if (code == null)
        throw new ArgumentNullException("code");
      m_Code = code;
      m_Lcid = lcid;
    }

    public override bool Equals(object obj) {
      TranslatorKey key = obj as TranslatorKey;
      if (key == null)
        return false;
      return m_Code == key.m_Code && m_Lcid == key.m_Lcid;
    }

    public override int GetHashCode() {
      return m_Code.GetHashCode() ^ m_Lcid;
    }
  }
}
